package Chapter2.Comparing;

public class ComparableCircle extends Circle implements CompareObject {
    public ComparableCircle() {
    }

    public ComparableCircle(int radius) {
        super(radius);
    }

    /*public int getRadius (){
            return super.radius;
        }*/
    @Override
    public int compareTo(Object o) {
        Circle circle = (Circle)o;
        return this.getRadius() - circle.getRadius();
    }
}
